<template>
  <div>
    <!-- 对象形式 -->
    <div
      :style="{
        width,
        height,
        'border-radius': borderRadius,
        backgroundColor
      }"></div>
    <div :style="obj"></div>
  </div>
</template>

<script>
export default {
  data: () => ({
    width: '100px',
    height: '100px',
    borderRadius: '10px',
    backgroundColor: 'rgba(17, 119, 255, 0.5)',
    obj: {
      width: '100px',
      height: '100px',
      'border-radius': '10px',
      backgroundColor: 'rgba(51, 170, 102, 0.5)'
    }
  })
}
</script>
